#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
    int m = 0;
    int n = 0;
    scanf("%d%d", &m, &n);
    int i = 1;
    int count = 1;
    for (i = 1; i < 32; i++)
    {
        if (((m >> i) & 1) != ((n >> i) & 1))
            count++;
    }
    printf("%d", count);

    return 0;
}
